-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Log radial menu interractions for the RCD, Issue #40902 #40986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Could you make it log an error if there its RcdMode.Invalid or default?
| var prototype = _protoManager.Index(component.ProtoId); | ||
| switch (prototype.Mode) | ||
| { | ||
| case RcdMode.ConstructTile: | ||
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Tile : {prototype.Prototype}"); | ||
| break; | ||
| case RcdMode.ConstructObject: | ||
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Object : {prototype.Prototype}"); | ||
| break; | ||
| case RcdMode.Deconstruct: | ||
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Deconstruct"); | ||
| break; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just
| var prototype = _protoManager.Index(component.ProtoId); | |
| switch (prototype.Mode) | |
| { | |
| case RcdMode.ConstructTile: | |
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Tile : {prototype.Prototype}"); | |
| break; | |
| case RcdMode.ConstructObject: | |
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Construct Object : {prototype.Prototype}"); | |
| break; | |
| case RcdMode.Deconstruct: | |
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: Deconstruct"); | |
| break; | |
| } | |
| var prototype = _protoManager.Index(component.ProtoId); | |
| _adminLogger.Add(LogType.RCD, LogImpact.Low, $"{ToPrettyString(args.Actor):user} set RCD mode to: {prototype.Mode} : {prototype.Prototype}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Set the current RCD prototype to the one supplied | ||
| component.ProtoId = args.ProtoId; | ||
|
|
||
| var prototype = _protoManager.Index(component.ProtoId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combine this with the HasIndex above into a _protoManager.Resolve

About the PR
Closes #40902
Added admin logs for radial menu interactions of the RCD
Why / Balance
Logging, see issue #40845
Technical details
Added logging
Media
Requirements
Breaking changes
Changelog